package jsave.tree;

import java.io.File;
import java.io.Serializable;

public class JSaveTree implements Serializable {

	private File rootPath;

	private FileNode rootNode;

	private long generatedDate;

	public JSaveTree(File rootPath, FileNode rootNode) {
		super();
		this.rootPath = rootPath;
		this.rootNode = rootNode;
		generatedDate = System.currentTimeMillis();
	}

	public File getRootPath() {
		return rootPath;
	}

	public void setRootPath(File rootPath) {
		this.rootPath = rootPath;
	}

	public FileNode getRootNode() {
		return rootNode;
	}

	public void setRootNode(FileNode rootNode) {
		this.rootNode = rootNode;
	}

	public long getGeneratedDate() {
		return generatedDate;
	}

	public void setGeneratedDate(long generatedDate) {
		this.generatedDate = generatedDate;
	}

	public File getFile4Saving() {
		return new File(rootPath.getPath() + File.separator + ".jsaveTree_"
				+ generatedDate);
	}
}
